#!/usr/bin/env python
# -*- coding:utf-8 -*-
from lxml import etree

if __name__ == "__main__":
    # 实例化好一个etree对象，且将被解析的源码加载到了该对象中
    tree = etree.parse('./data/test.html')
    r = tree.xpath('/html/head/title/text()')
    print(r[0])